package com.whsxt.common;

/**
 * 异常的定义
 */
public enum CodeMsg {

    /**
     * 异常码的定义
     * 前三位：模块的编号
     * 之后三位：业务
     * 四位：具体的业务异常
     */
    USER_NAME_FOUND("0010010001", "用户【%s】已存在", "username(%s) has found"),

    ROLE_TAG_FOUND("0010020001", "角色【%s】已经存在", "role tag(%s) has found"),

    CAR_NOT_FOUND("0010030001", "车辆不存在", "car has not found"),
    CAR_RENTED("0010030002","车辆已被出租","car has rented"),
    CAR_NUMBER_FOUND("0010030003","车牌号【%s】已经存在了","car num(%s) has found"),
    CUSTOMER_NOT_FOUND("0010030004", "客户不存在", "customer has not found"),

    CUSTOMER_ID_CARD_FOUND("0010040001", "客户证件号【%s】已经存在", "customer(%s)已经存在"),

    RETURN_RECORD_ADD_FAILED("0010050001","归还记录添加失败", "add return record failed"),
    RENT_STATUS_UPDATE_FAILED("0010050002","租车状态修改失败", "update rent status failed"),
    CAR_RENT5_STATUS_UPDATE_FAILED("0010050003", "车辆出租状态修改失败", "update car rent status failed"),

    PERMISSION_TAG_FOUND("0010060001", "权限标识【%s】已经存在", "permission tag(%s) has found");

    public String code;
    public String msg;
    public String desc;

    CodeMsg(String code, String msg, String desc){
        this.code = code;
        this.msg = msg;
        this.desc = desc;
    }
}
